﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class RptcierreFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As RptcierreBE
        Dim tmpRptcierre As RptcierreBE = New RptcierreBE()
        Try
            With tmpRptcierre
                .Clave = convertDTFromDb.ConvertString(dr.Item("Clave"))
                .Descrip = convertDTFromDb.ConvertString(dr.Item("Descrip"))
                .Ent = convertDTFromDb.ConvertDecimal(dr.Item("Ent"))
                .ExistAct = convertDTFromDb.ConvertDecimal(dr.Item("ExistAct"))
                .ExistAnt = convertDTFromDb.ConvertDecimal(dr.Item("ExistAnt"))
                .ExistFis = convertDTFromDb.ConvertDecimal(dr.Item("ExistFis"))
                .IdAlmacen = convertDTFromDb.ConvertDecimal(dr.Item("IdAlmacen"))
                .IdEmpresa = convertDTFromDb.ConvertShort(dr.Item("IdEmpresa"))
                .Periodo = convertDTFromDb.ConvertDecimal(dr.Item("Periodo"))
                .Sal = convertDTFromDb.ConvertDecimal(dr.Item("Sal"))
                .UM = convertDTFromDb.ConvertString(dr.Item("UM"))
            End With
            Return tmpRptcierre
        Catch ex As Exception
            Throw
        Finally
            tmpRptcierre = Nothing
        End Try
    End Function
End Class
